package com.jht.engine.platsign;

import android.app.Notification;
import android.app.Service;
import android.content.Intent;
import android.os.Build;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.jht.engine.platsign.IPlatformService;
import com.jxw.engine.platsign.MainActivity;

/* loaded from: classes.dex */
public class PlatformService extends Service {
    private final IPlatformService.Stub mBinder = new IPlatformService.Stub() { // from class: com.jht.engine.platsign.PlatformService.1
        @Override // com.jht.engine.platsign.IPlatformService
        public boolean getFullScreen() throws RemoteException {
            return true;
        }

        @Override // com.jht.engine.platsign.IPlatformService
        public String getCertification() {
            return PlatformService.this.readCertification();
        }

        @Override // com.jht.engine.platsign.IPlatformService
        public String getCustomIsbn() throws RemoteException {
            return PlatformService.this.readCustomIsbn();
        }

        @Override // com.jht.engine.platsign.IPlatformService
        public String getFlashID() throws RemoteException {
            return PlatformService.this.readFlashID();
        }

        @Override // com.jht.engine.platsign.IPlatformService
        public String getSeries() throws RemoteException {
            return PlatformService.this.readSeries();
        }
    };

    @Override // android.app.Service
    public void onRebind(Intent intent) {
    }

    @Override // android.app.Service
    public int onStartCommand(Intent intent, int i, int i2) {
        return 1;
    }

    @Override // android.app.Service
    public boolean onUnbind(Intent intent) {
        return true;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public String readCertification() {
        return getSharedPreferences(MainActivity.PREFERENCE, 0).getString("registMac", null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public String readCustomIsbn() {
        return getSharedPreferences(MainActivity.PREFERENCE, 0).getString(MainActivity.CUSTOMISBN, null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public String readSeries() {
        return getSharedPreferences(MainActivity.PREFERENCE, 0).getString("series", null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public String readFlashID() {
        return getSharedPreferences(MainActivity.PREFERENCE, 0).getString(MainActivity.SERIS, null);
    }

    @Override // android.app.Service
    public void onCreate() {
        super.onCreate();
        Log.e(NotificationCompat.CATEGORY_SERVICE, "LoginService");
        if (Build.VERSION.SDK_INT >= 26) {
            startForeground(1, new Notification());
        }
    }

    @Override // android.app.Service
    public IBinder onBind(Intent intent) {
        return this.mBinder;
    }

    @Override // android.app.Service
    public void onDestroy() {
        stopForeground(true);
    }
}
